package com.hut.oa.model.bean;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import net.minidev.json.annotate.JsonIgnore;

/**
 * 任务用户表
 * @author 熊涛
 *
 */
@Entity
@Table(name="task_user")
public class TaskUser {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="tu_id")
	private Long tuid;//任务管理表id
	
	@Column(name="tu_status")
	private Long tmStatus=1l;//任务状态
	
	@ManyToOne()
	@JsonIgnore
	@JoinColumn(name="tm_id")	
	private TaskManage task;//任务id
	
	@ManyToOne()
	@JsonIgnore
	@JoinColumn(name="u_id",nullable=false)	
	private User user;//用户id

	public Long getTuid() {
		return tuid;
	}

	public void setTuid(Long tuid) {
		this.tuid = tuid;
	}

	public Long getTmStatus() {
		return tmStatus;
	}

	public void setTmStatus(Long tmStatus) {
		this.tmStatus = tmStatus;
	}

	public TaskManage getTask() {
		return task;
	}

	public void setTask(TaskManage task) {
		this.task = task;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String toString() {
		return "TaskUser [tuid=" + tuid + ", tmStatus=" + tmStatus + "]";
	}
}
